package com.charles.video.common.security.auth;

import com.charles.video.api.model.MemberLogin;

/**
 * @author Charles-H
 * 
 * 权限验证工具类
 */
public class AuthUtil {
    
    /** 获取AuthLogic逻辑对象 */
    public static AuthLogic authLogic = new AuthLogic();
    
    /** 注销会话 */
    public static void logout() {
        authLogic.logout();
    }
    
    /** 通过token令牌注销会话 */
    public static void logoutByToken(String token) {
        authLogic.logoutByToken(token);
    }
    
    /** 判断当前成员是否登录 */
    public static void checkLogin() {
        authLogic.checkLogin();
    }
    
    /** 获取当前成员 */
    public static MemberLogin getMemberLogin(String token) {
        return authLogic.getMemberLogin(token);
    }
    
    /** 验证当前成员有效期 */
    public static void verifyUserLoginExpire(MemberLogin memberLogin) {
        authLogic.verifyUserLoginExpire(memberLogin);
    }
    
}

